module.exports = function (html) {
  var start = html.indexOf('__VIEWSTATE')+12
  var end;
  for(var i = start; i<html.length; i++) {
    if(html[i]==='|') {
      end = i;
      break;
    }
  }
  var viewstate = html.substring(start, end)
  return viewstate
}